<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  <meta name="author" content="紫锦木">
  

  <title>uni-app 插件之 v-tabs | 紫锦木</title>

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  
  <meta name="keywords" content="uniapp,uniapp,v-tabs,">
  

  
  <meta name="description" content="这是 v-tabs 插件的升级版本，参数上有很大变动，支持 H5 小程序 手机端，如果是在之前的插件上升级的话，请注意参数的变更，触发的事件没有变更。">

  

  
  <script src="//cdn.jsdelivr.net/npm/leancloud-storage@3.11.1/dist/av-min.js" async></script>
  

  
  <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" async></script>
  

  
  <script src="//unpkg.com/valine/dist/Valine.min.js" async></script>
  

  

  <script>
  // theme-ad's config script
  // it can be used in every script
  
  window.AD_CONFIG = {
    leancloud: {"appid":"3zwI0gU7grT0MfYUEurqXnWE-gzGzoHsz","appkey":"yVgwglQXfL3vbQiSzeo1Xhqx","comment":true,"count":true},
    welcome: {"enable":false,"interval":30},
    start_time: "2019-05-01",
    passwords: ["efe07af7441da2b69c4a41e42e73be4db47f66010a56900788a458354a7373ec", ],
    is_post: true,
    lock: false,
    author: "紫锦木",
    share: {"twitter":false,"facebook":false,"weibo":true,"qq":true,"wechat":true},
    mathjax: true,
    page_type: "",
    root: "/"
  };
</script>

  <script src="/vendor/sha256.min.js"></script>
<script src="/js/auth.js"></script>
<script src="/js/index.js"></script>
<script src="/vendor/qrcode.min.js"></script>

  
  <link rel="icon" href="/images/favicon.ico">
  <link rel="apple-touch-icon" href="/images/touch-icon.png">
  

  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

  <link rel="stylesheet" href="/css/index.css">
<link rel="stylesheet" href="/styles/components/highlight/highlight.css">

  
</head>
  <body>
    <header class="site-header">
  <div class="site-header-brand">
    
      <span class="site-header-brand-title">
        <a href="/">紫锦木</a>
      </span>
    
    
      <span class="site-header-brand-motto"> | 足迹👣</span>
    
  </div>
  <div class="site-header-right">
    <nav class="site-header-navigation">
      
        <a href="/" target="_self">首页</a>
      
        <a href="/archives/" target="_self">归档</a>
      
        <a href="/tags/" target="_self">标签</a>
      
        <a href="/categories/" target="_self">分类</a>
      
        <a href="/friends/" target="_self">友链</a>
      
        <a href="/about/" target="_self">关于</a>
      
    </nav>
    <div class="site-header-btn">
      
        <a href="https://github.com/xfjpeter/" target="_blank" id="site-github">
          <i class="fa fa-github-alt"></i>
        </a>
      
      <a href="javascript:void(0);" id="site-search">
        <i class="fa fa-search"></i>
      </a>
      <a href="javascript:void(0);" id="site-nav-btn">
        <i class="fa fa-ellipsis-v"></i>
      </a>
    </div>
  </div>
</header>
<nav class="table-content" id="site-nav">
  <div class="table-content-title">
    <span>导航</span>
  </div>
  <div class="table-content-main">
    <ol class="toc">
      
        <li class="toc-item">
          <a href="/" target="_self">
            首页
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/archives/" target="_self">
            归档
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/tags/" target="_self">
            标签
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/categories/" target="_self">
            分类
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/friends/" target="_self">
            友链
          </a>
        </li>
      
        <li class="toc-item">
          <a href="/about/" target="_self">
            关于
          </a>
        </li>
      
    </ol>
  </div>
</nav>
<div id="site-process"></div>
    <main>
      
  <div class="passage">
  <div class="passage-meta">
    <span>
      <i class="fa fa-calendar"></i>2020-09-22
    </span>
    
      <span>
        | <a href="/categories/uniapp/"><i class="fa fa-bookmark"></i>uniapp</a>
      </span>
    
    
      <span>
        | <i class="fa fa-unlock-alt"></i>UNLOCK
      </span>
    
  </div>
  <h1 class="passage-title">
    uni-app 插件之 v-tabs
  </h1>
  
  <article class="passage-article">
    <h2 id="插件说明"><a href="#插件说明" class="headerlink" title="插件说明"></a>插件说明</h2><blockquote>
<p>这是 <code>v-tabs</code> 插件的升级版本，参数上有很大变动，支持 <code>H5</code> <code>小程序</code> <code>手机端</code>，如果是在之前的插件上升级的话，请注意参数的变更，触发的事件没有变更。</p>
</blockquote>
<h2 id="使用说明"><a href="#使用说明" class="headerlink" title="使用说明"></a>使用说明</h2><p><strong>贴上地址：</strong></p>
<ol>
<li>插件地址： <a href="https://ext.dcloud.net.cn/plugin?id=1971" target="_blank" rel="noopener">https://ext.dcloud.net.cn/plugin?id=1971</a></li>
<li>Github 地址：<a href="https://github.com/xfjpeter/uni-plugins" target="_blank" rel="noopener"> https://github.com/xfjpeter/uni-plugins</a></li>
</ol>
<h3 id="1、最基本用法"><a href="#1、最基本用法" class="headerlink" title="1、最基本用法"></a>1、最基本用法</h3><ul>
<li>视图文件</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">v-tabs</span> <span class="attr">v-model</span>=<span class="string">"current"</span> <span class="attr">:tabs</span>=<span class="string">"tabs"</span> @<span class="attr">change</span>=<span class="string">"changeTab"</span>&gt;</span><span class="tag">&lt;/<span class="name">v-tabs</span>&gt;</span></span><br></pre></td></tr></table></figure>
<ul>
<li>脚本文件</li>
</ul>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> &#123;</span><br><span class="line">  data() &#123;</span><br><span class="line">    <span class="keyword">return</span> &#123;</span><br><span class="line">      current: <span class="number">0</span>,</span><br><span class="line">      tabs: [<span class="string">'军事'</span>, <span class="string">'国内'</span>, <span class="string">'新闻新闻'</span>, <span class="string">'军事'</span>, <span class="string">'国内'</span>, <span class="string">'新闻'</span>, <span class="string">'军事'</span>, <span class="string">'国内'</span>, <span class="string">'新闻'</span>]</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;,</span><br><span class="line">  methods: &#123;</span><br><span class="line">    changeTab(index) &#123;</span><br><span class="line">      <span class="built_in">console</span>.log(<span class="string">'当前选中的项：'</span> + index)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="2、平铺整个屏幕"><a href="#2、平铺整个屏幕" class="headerlink" title="2、平铺整个屏幕"></a>2、平铺整个屏幕</h3><ul>
<li>视图文件</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">v-tabs</span> <span class="attr">v-model</span>=<span class="string">"activeTab"</span> <span class="attr">:scroll</span>=<span class="string">"false"</span> <span class="attr">:tabs</span>=<span class="string">"['全部', '进行中', '已完成']"</span>&gt;</span><span class="tag">&lt;/<span class="name">v-tabs</span>&gt;</span></span><br></pre></td></tr></table></figure>
<ul>
<li>脚本文件</li>
</ul>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> &#123;</span><br><span class="line">  data() &#123;</span><br><span class="line">    <span class="keyword">return</span> &#123;</span><br><span class="line">      activeTab: <span class="number">0</span></span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="3、胶囊用法"><a href="#3、胶囊用法" class="headerlink" title="3、胶囊用法"></a>3、胶囊用法</h3><ul>
<li>视图文件</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">v-tabs</span> <span class="attr">v-model</span>=<span class="string">"current"</span> <span class="attr">:tabs</span>=<span class="string">"tabs"</span> <span class="attr">:pills</span>=<span class="string">"true"</span> <span class="attr">line-height</span>=<span class="string">"0"</span> <span class="attr">activeColor</span>=<span class="string">"#fff"</span> @<span class="attr">change</span>=<span class="string">"changeTab"</span>&gt;</span><span class="tag">&lt;/<span class="name">v-tabs</span>&gt;</span></span><br></pre></td></tr></table></figure>
<ul>
<li>脚本文件</li>
</ul>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">data() &#123;</span><br><span class="line">  <span class="keyword">return</span> &#123;</span><br><span class="line">    current: <span class="number">2</span>,</span><br><span class="line">    tabs: [</span><br><span class="line">        <span class="string">'军事'</span>,</span><br><span class="line">        <span class="string">'国内'</span>,</span><br><span class="line">        <span class="string">'新闻新闻'</span>,</span><br><span class="line">        <span class="string">'军事'</span>,</span><br><span class="line">        <span class="string">'国内'</span>,</span><br><span class="line">        <span class="string">'新闻'</span>,</span><br><span class="line">        <span class="string">'军事'</span>,</span><br><span class="line">        <span class="string">'国内'</span>,</span><br><span class="line">        <span class="string">'新闻'</span>,</span><br><span class="line">      ],</span><br><span class="line">  &#125;,</span><br><span class="line">  methods: &#123;</span><br><span class="line">    changeTab(index) &#123;</span><br><span class="line">      <span class="built_in">console</span>.log(<span class="string">'当前选中索引：'</span> + index)</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="文档说明"><a href="#文档说明" class="headerlink" title="文档说明"></a>文档说明</h2><h3 id="1、属性说明"><a href="#1、属性说明" class="headerlink" title="1、属性说明"></a>1、属性说明</h3><table>
<thead>
<tr>
<th style="text-align:center">参数</th>
<th style="text-align:center">类型</th>
<th style="text-align:center">默认值</th>
<th style="text-align:center">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">value</td>
<td style="text-align:center">Number</td>
<td style="text-align:center">0</td>
<td style="text-align:center">必传(双向绑定的值)</td>
</tr>
<tr>
<td style="text-align:center">color</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘#333’</td>
<td style="text-align:center">默认文字颜色</td>
</tr>
<tr>
<td style="text-align:center">activeColor</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘#2979ff’</td>
<td style="text-align:center">选中文字的颜色</td>
</tr>
<tr>
<td style="text-align:center">fontSize</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘28rpx’</td>
<td style="text-align:center">默认文字大小(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">bold</td>
<td style="text-align:center">Boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">是否加粗选中项</td>
</tr>
<tr>
<td style="text-align:center">scroll</td>
<td style="text-align:center">Boolean</td>
<td style="text-align:center">true</td>
<td style="text-align:center">是否显示滚动条，平铺设置 false</td>
</tr>
<tr>
<td style="text-align:center">height</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘70rpx’</td>
<td style="text-align:center">tab 高度(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">lineHeight</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘10rpx’</td>
<td style="text-align:center">滑块高度(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">lineColor</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘#2979ff’</td>
<td style="text-align:center">滑块的颜色</td>
</tr>
<tr>
<td style="text-align:center">lineScale</td>
<td style="text-align:center">Number</td>
<td style="text-align:center">0.5</td>
<td style="text-align:center">滑块宽度缩放值</td>
</tr>
<tr>
<td style="text-align:center">lineRadius</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘10rpx’</td>
<td style="text-align:center">滑块圆角宽度(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">pills</td>
<td style="text-align:center">Boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">是否开启胶囊</td>
</tr>
<tr>
<td style="text-align:center">pillsColor</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘#2979ff’</td>
<td style="text-align:center">胶囊背景颜色(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">pillsBorderRadius</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘10rpx’</td>
<td style="text-align:center">胶囊圆角宽度(rpx 或 px)</td>
</tr>
<tr>
<td style="text-align:center">field</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘’</td>
<td style="text-align:center">如果 tabs 子项是对象，输入需要展示的键名</td>
</tr>
<tr>
<td style="text-align:center">bgColor</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘#fff’</td>
<td style="text-align:center">背景色，支持 linear-gradient 渐变</td>
</tr>
<tr>
<td style="text-align:center">padding</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘0’</td>
<td style="text-align:center">整个 tab padding 属性</td>
</tr>
<tr>
<td style="text-align:center">fixed</td>
<td style="text-align:center">Boolean</td>
<td style="text-align:center">false</td>
<td style="text-align:center">是否固定在顶部</td>
</tr>
<tr>
<td style="text-align:center">paddingItem</td>
<td style="text-align:center">String</td>
<td style="text-align:center">‘0 22rpx’</td>
<td style="text-align:center">选项的边距（设置上下不生效，需要设置高度）</td>
</tr>
</tbody>
</table>
<h3 id="2、事件说明"><a href="#2、事件说明" class="headerlink" title="2、事件说明"></a>2、事件说明</h3><table>
<thead>
<tr>
<th style="text-align:center">名称</th>
<th style="text-align:center">参数</th>
<th style="text-align:center">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">change</td>
<td style="text-align:center">index</td>
<td style="text-align:center">改变选中项触发, index 选中项的下标</td>
</tr>
</tbody>
</table>
<h2 id="更新日志"><a href="#更新日志" class="headerlink" title="更新日志"></a>更新日志</h2><h3 id="2020-09-21"><a href="#2020-09-21" class="headerlink" title="2020-09-21"></a>2020-09-21</h3><ol>
<li>修复添加 <code>fixed</code> 属性后，滚动条无效</li>
<li>修复选项很少的情况下，下划线计算计算错误</li>
<li>新增 <code>paddingItem</code> 属性，设置选项左右边距（上下边距需要设置 <code>height</code> 属性，或者设置 <code>padding</code> 属性）</li>
</ol>
<p><strong>写在最后：</strong><br>欢迎各位老铁反馈 bug ，本人后端 PHP 一枚，只是应为感兴趣前端，自己琢磨，自己搞。如果你在使用的过程中有什么不合理，需要优化的，都可以在下面评论（或加我 QQ: 1207791534），本人看见后回复、修正，感谢。</p>
<h3 id="2020-09-17"><a href="#2020-09-17" class="headerlink" title="2020-09-17"></a>2020-09-17</h3><ol>
<li>紧急修复 bug，横向滑动不了的情况</li>
</ol>
<h3 id="2020-09-16"><a href="#2020-09-16" class="headerlink" title="2020-09-16"></a>2020-09-16</h3><ol>
<li>新增 <code>fixed</code> 属性，是否固定在顶部，示例地址：<code>pages/tabs/tabs-static</code></li>
<li>优化之前的页面结构</li>
</ol>
<p><strong>注意：</strong></p>
<ol>
<li>使用 <code>padding</code> 属性的时候，尽量不要左右边距，会导致下划线位置不对</li>
<li>如果不绑定 <code>v-model</code> 会导致 <code>change</code> 事件改变的时候，下划线不跟随问题</li>
</ol>
<h3 id="2020-09-09"><a href="#2020-09-09" class="headerlink" title="2020-09-09"></a>2020-09-09</h3><ol>
<li>修复 <code>width</code> 错误，dom 加载的时候没有及时获取到 <code>data</code> 属性导致的。</li>
</ol>
<h3 id="2020-08-29"><a href="#2020-08-29" class="headerlink" title="2020-08-29"></a>2020-08-29</h3><ol>
<li>优化异步改变 <code>tabs</code> 后，下划线不初始化问题</li>
<li><code>github</code> 地址上有图 2 的源码，需要的自行下载，页面路径：<code>pages/tabs/order</code></li>
</ol>
<h3 id="2020-08-20"><a href="#2020-08-20" class="headerlink" title="2020-08-20"></a>2020-08-20</h3><ol>
<li>优化 <code>节点查询</code> 和 <code>选中渲染</code></li>
<li>优化支付宝中 <code>createSelectorQuery()</code> 的影响</li>
</ol>
<h3 id="2020-08-19"><a href="#2020-08-19" class="headerlink" title="2020-08-19"></a>2020-08-19</h3><ol>
<li>优化 <code>change</code> 事件触发机制</li>
</ol>
<h3 id="2020-08-16"><a href="#2020-08-16" class="headerlink" title="2020-08-16"></a>2020-08-16</h3><ol>
<li>修改默认高度为 <code>70rpx</code></li>
<li>新增属性 <code>bgColor</code>，可设置背景颜色，默认 <code>#fff</code></li>
<li>新增整个 <code>tab</code> 的 <code>padding</code> 属性，默认 <code>0</code></li>
</ol>
<h3 id="2020-08-13"><a href="#2020-08-13" class="headerlink" title="2020-08-13"></a>2020-08-13</h3><ol>
<li>全新的 <code>v-tabs 2.0</code></li>
<li>支持 <code>H5</code> <code>小程序</code> <code>APP</code></li>
<li>属性高度可配置</li>
</ol>
<h2 id="预览"><a href="#预览" class="headerlink" title="预览"></a>预览</h2><p><img src="https://tva1.sinaimg.cn/large/007S8ZIlgy1ghsv40mj76g30ai0i2tsd.gif" alt="v-tabs 2.0.1.gif"><br><img src="https://img-cdn-aliyun.dcloud.net.cn/stream/plugin_screens/42f3a920-a674-11ea-8a24-ffee00625e2e_1.png?v=1597912963" alt="v-tabs 2.0.2.gif"></p>
  </article>
  <aside class="table-content" id="site-toc">
  <div class="table-content-title">
    <i class="fa fa-arrow-right fa-lg" id="site-toc-hide-btn"></i>
    <span>目录</span>
  </div>
  <div class="table-content-main">
    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#插件说明"><span class="toc-text">插件说明</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#使用说明"><span class="toc-text">使用说明</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1、最基本用法"><span class="toc-text">1、最基本用法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2、平铺整个屏幕"><span class="toc-text">2、平铺整个屏幕</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3、胶囊用法"><span class="toc-text">3、胶囊用法</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#文档说明"><span class="toc-text">文档说明</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1、属性说明"><span class="toc-text">1、属性说明</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2、事件说明"><span class="toc-text">2、事件说明</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#更新日志"><span class="toc-text">更新日志</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-09-21"><span class="toc-text">2020-09-21</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-09-17"><span class="toc-text">2020-09-17</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-09-16"><span class="toc-text">2020-09-16</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-09-09"><span class="toc-text">2020-09-09</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-08-29"><span class="toc-text">2020-08-29</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-08-20"><span class="toc-text">2020-08-20</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-08-19"><span class="toc-text">2020-08-19</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-08-16"><span class="toc-text">2020-08-16</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2020-08-13"><span class="toc-text">2020-08-13</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#预览"><span class="toc-text">预览</span></a></li></ol>
  </div>
</aside>
  
    <aside class="passage-copyright">
      <div>本文作者: 紫锦木</div>
      
        <div>
          原文链接: 
          <a href target="_blank">https://www.johnxu.net/articles/ckfdn2tx6000dvm8o51nunmaq.html</a>
        </div>
      
      <div>
        版权声明: 本博客所有文章除特别声明外, 均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议. 转载请注明出处!
      </div>
    </aside>
  
  
    <div class="passage-tags">
     
      <a href="/tags/uniapp/"><i class="fa fa-tags"></i>uniapp</a>
     
      <a href="/tags/v-tabs/"><i class="fa fa-tags"></i>v-tabs</a>
    
    </div>
  
</div>

    </main>
    
      
<div class="site-comment-contanier" data-plateform="leancloud">
  
    <p id="site-comment-info">
      <i class="fa fa-spinner fa-spin"></i> 评论加载中
    </p>
    <div id="site-comment"></div>
  
</div>
    
    <div class="site-footer-wrapper">
  <footer class="site-footer">
    
    
    <div class="site-footer-col">
      <h5 class="site-footer-title">博客推荐</h5>
      
      <span class="site-footer-item">
        <a href="https://godbmw.com/" target="_blank">GodBMW</a>
      </span>
      
      <span class="site-footer-item">
        <a href="http://ruanyifeng.com/" target="_blank">阮一峰的个人网站</a>
      </span>
      
    </div>
    
    <div class="site-footer-col">
      <h5 class="site-footer-title">抓到我</h5>
      
      <span class="site-footer-item">
        <a href="https://juejin.im/user/5b4ffe335188251afa62cd8a" target="_blank">掘金</a>
      </span>
      
      <span class="site-footer-item">
        <a href="https://segmentfault.com/u/johnxu_58f42b627331b" target="_blank">思否</a>
      </span>
      
      <span class="site-footer-item">
        <a href="https://www.jianshu.com/u/56f6d0e3bae3" target="_blank">简书</a>
      </span>
      
    </div>
    
    
    <div class="site-footer-info">
      <i class="fa fa-clock-o"></i> 本站已稳定运行<span id="site-time"></span>
    </div>
    
    <div class="site-footer-info">
      <i class="fa fa-paw"></i> 您是本站第 <span id="site-count"></span> 位访客
    </div>
    
    
    <div class="site-footer-info">
      <i class="fa fa-at"></i> Email: fsyzxz@163.com
    </div>
    
    <div class="site-footer-info">
      <i class="fa fa-copyright"></i>
      2019 <a href="https://github.com/dongyuanxin/theme-ad/" target="_blank">Theme-AD</a>.
      Created by <a href="https://godbmw.com/" target="_blank">GodBMW</a>.
      All rights reserved.
    </div>
    <div class="site-footer-info">
      <a href="http://www.beian.miit.gov.cn" target="_blank">蜀ICP备17000668号</a>
    </div>
  </footer>
</div>
    <div id="site-layer" style="display:none;">
  <div class="site-layer-content">
    <div class="site-layer-header">
      <span class="site-layer-header-title" id="site-layer-title"></span>
      <i class="fa fa-close" id="site-layer-close"></i>
    </div>
    <div class="site-layer-body" id="site-layer-container">
      <div class="site-layer-input" id="site-layer-search" style="display: none;">
        <input type="text">
        <i class="fa fa-search"></i>
      </div>
      
        <div class="site-layer-reward" id="site-layer-reward" style="display: none;">
          
            <div>
              <img src="/images/wechat.png" alt="WeChat">
              
                <p>WeChat</p>
              
            </div>
          
            <div>
              <img src="/images/alipay.png" alt="AliPay">
              
                <p>AliPay</p>
              
            </div>
          
        </div>
      
      <div id="site-layer-welcome" style="display:none;"></div>
    </div>
  </div>
</div>
    

<div class="bottom-bar">
  <div class="bottom-bar-left">
    <a href="javascript:void(0);" data-enable="false">
      <i class="fa fa-arrow-left"></i>
    </a>
    <a href="/articles/ckfdn2txf000svm8ovifwfhea.html" data-enable="true">
      <i class="fa fa-arrow-right"></i>
    </a>
  </div>
  <div class="bottom-bar-right">
    <a href="javascript:void(0);" data-enable="true" id="site-toc-show-btn">
      <i class="fa fa-bars"></i>
    </a>
    
      <a href="#site-comment" data-enable="true">
        <i class="fa fa-commenting"></i>
      </a>
    
    <a href="javascript:void(0);" id="site-toggle-share-btn">
      <i class="fa fa-share-alt"></i>
    </a>
    
      <a href="javascript:void(0);" id="site-reward">
        <i class="fa fa-thumbs-up"></i>
      </a>
    
    <a href="javascript:void(0);" id="back-top-btn">
      <i class="fa fa-chevron-up"></i>
    </a>
  </div>
</div>
    <div id="share-btn">
  
  
  
    <a id="share-btn-weibo" href="javascript:void(0);" target="_blank">
      <i class="fa fa-weibo"></i>
    </a>
  
  
    <a id="share-btn-qq" href="javascript:void(0);" target="_blank">
      <i class="fa fa-qq"></i>
    </a>
  
  
    <a id="share-btn-wechat" href="javascript:void(0);" target="_blank">
      <i class="fa fa-wechat"></i>
    </a>
  
</div>
    


  <script async>
  (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
  })();
  </script>




    
  </body>
</html>